package com.sjn.arm;

import com.sjn.Template.composingRoom;

import com.sjn.res.egFoundry.*;
import com.sjn.res.egBlueprint.*;
import com.sjn.util.encrytion.*;
import com.sjn.res.make.*;
import com.sjn.arm.armFrame.*;


public class ARMcomposingRoom extends composingRoom {
    //创建加密模块
    encryForblueprint encryForblueprint = new encryForblueprint();
    @Override
    public String Foundry(int i) {
        //开始选择代工厂
        if(i==1) {
            egFoundry egFoundry = Foundryitem.getarmFoundry(new egFoundryRAM1());
            return egFoundry.getFoundryName();
        }
        else if(i==2){
            egFoundry egFoundry = Foundryitem.getarmFoundry(new egFoundryRAM2());
            return egFoundry.getFoundryName();
        }
        else{
            return "输入有误,选择代工厂失败";
        }
    }

    @Override
    public String Blueprint(int x,int y,String technology) {
        //开始选择arm蓝图
        bluePrintdata b = new bluePrintdemo(x,y,encryForblueprint.getdata(technology),new egbluePrintarm());

        return b.draw();
    }
    //外观模式
    @Override
    public String Frameworks(int i) {
        FrameMaker frameMaker = new FrameMaker();
        if(i==1){
           return frameMaker.showFrame1();
        }
        else if (i ==2){
            return frameMaker.showFrame2();

        }
        else if(i==3){
            return frameMaker.showFrame3();
        }
        else if (i==4){
            return frameMaker.showFrame4();
        }
        else if(i == 5){
            return frameMaker.showFrame5();
        }
        else if (i == 6){
            return frameMaker.showFrame6();
        }
        else
        return "输入错误,请重新载入";

    }

    @Override
    public String Production() {
        MakeFactory makeFactory = new MakeFactory();
        Makesth makearm = makeFactory.getMake(new Makeram());

        return makearm.making();
    }
}
